// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'ProductAssignId',
        footer: "Foots",
        cnName: '车间作业任务',
        name: 'ProductAssign',
        newTabEdit: false,
        url: "/ProductAssign/",
        sortName: "ProductAssignId",
        fixedSearch:false
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"ProductNoticeNo":"","BillNo":"","BillDate":"","ProductProcessNo":"","ProductProcessName":"","ProductProcessTypeId":"","DepartmentId":[],"ReportWorkTypeId":"","GroupId":"","PriceTypeId":"","WorkHourPrice":"","WorkQtyPrice":"","WorkerId":[],"PlanQty":"","AssignQty":"","QualifyQty":"","UnQualifyQty":"","ScrapQty":""};
    const editFormOptions = [[{"title":"作业任务单号","field":"BillNo","type":"text"},
                               {"title":"生产通知单号","required":true,"field":"ProductNoticeNo","type":"text"},
                               {"title":"作业任务日期","required":true,"field":"BillDate","type":"date"}],
                              [{"dataKey":"工序类型","data":[],"title":"工序类型","field":"ProductProcessTypeId","type":"select"},
                               {"title":"工序编码","required":true,"field":"ProductProcessNo","type":"text"},
                               {"title":"工序名称","required":true,"field":"ProductProcessName","type":"text"}],
                              [{"dataKey":"部门级联","data":[],"title":"部门","required":true,"field":"DepartmentId","type":"cascader"},
                               {"dataKey":"报工方式","data":[],"title":"报工方式","field":"ReportWorkTypeId","type":"select"},
                               {"dataKey":"班组信息","data":[],"title":"班组","field":"GroupId","type":"select"}],
                              [{"dataKey":"计价方式","data":[],"title":"计价方式","required":true,"field":"PriceTypeId","type":"select"},
                               {"title":"计时单价","required":true,"field":"WorkHourPrice","type":"decimal"},
                               {"title":"计件单价","required":true,"field":"WorkQtyPrice","type":"decimal"}],
                              [{"dataKey":"职员","data":[],"title":"作业人员","field":"WorkerId","type":"selectList"},
                               {"title":"计划数量","field":"PlanQty","type":"decimal"},
                               {"title":"派工数量","field":"AssignQty","type":"decimal"}],
                              [{"title":"合格数量","field":"QualifyQty","type":"decimal"},
                               {"title":"不合格数量","field":"UnQualifyQty","type":"decimal"},
                               {"title":"报废数量","field":"ScrapQty","type":"decimal"}]];
    const searchFormFields = {"ProductNoticeNo":"","BillNo":"","BillDate":""};
    const searchFormOptions = [[{"title":"生产通知单号","field":"ProductNoticeNo","type":"like"},{"title":"作业任务单号","field":"BillNo","type":"like"},{"title":"作业任务日期","field":"BillDate","type":"date"}]];
    const columns = [{field:'ProductAssignId',title:'生产派工单标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProductNoticeId',title:'生产通知单标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'ProductTaskProcessId',title:'生产任务工序明细标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'ProductTaskId',title:'生产任务单',type:'int',bind:{ key:'生产任务单编号',data:[]},width:80,align:'left'},
                       {field:'ProductNoticeNo',title:'生产通知单号',type:'string',width:110,require:true,align:'left'},
                       {field:'BillNo',title:'作业任务单号',type:'string',link:true,width:110,align:'left'},
                       {field:'BillDate',title:'作业任务日期',type:'date',width:110,require:true,align:'left'},
                       {field:'ProductProcessId',title:'工序标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'ProductProcessNo',title:'工序编码',type:'string',width:110,require:true,align:'left'},
                       {field:'ProductProcessName',title:'工序名称',type:'string',width:110,require:true,align:'left'},
                       {field:'ProductProcessTypeId',title:'工序类型',type:'int',bind:{ key:'工序类型',data:[]},width:110,align:'left'},
                       {field:'DepartmentId',title:'部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,require:true,align:'left'},
                       {field:'DepartmentName',title:'部门名称',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ReportWorkTypeId',title:'报工方式',type:'int',bind:{ key:'报工方式',data:[]},width:110,align:'left'},
                       {field:'GroupId',title:'班组',type:'int',bind:{ key:'班组信息',data:[]},width:110,align:'left'},
                       {field:'PriceTypeId',title:'计价方式',type:'int',bind:{ key:'计价方式',data:[]},width:80,require:true,align:'left'},
                       {field:'WorkHourPrice',title:'计时单价',type:'decimal',width:110,require:true,align:'left'},
                       {field:'WorkQtyPrice',title:'计件单价',type:'decimal',width:110,require:true,align:'left'},
                       {field:'WorkerId',title:'作业人员',type:'string',bind:{ key:'职员',data:[]},width:110,align:'left'},
                       {field:'PlanQty',title:'计划数量',type:'decimal',width:110,align:'left'},
                       {field:'AssignQty',title:'派工数量',type:'decimal',width:110,align:'left'},
                       {field:'QualifyQty',title:'合格数量',type:'decimal',width:110,align:'left'},
                       {field:'UnQualifyQty',title:'不合格数量',type:'decimal',width:110,align:'left'},
                       {field:'ScrapQty',title:'报废数量',type:'decimal',width:110,align:'left'},
                       {field:'CompleteStatusId',title:'完工状态',type:'int',bind:{ key:'报工状态',data:[]},width:80,require:true,align:'left'},
                       {field:'CreateID',title:'创建人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:110,align:'left'},
                       {field:'ModifyID',title:'修改人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditDate',title:'审核日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'AuditId',title:'审核人标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人',type:'string',width:120,align:'left'},
                       {field:'IsChecked',title:'是否质检',type:'int',bind:{ key:'是否',data:[]},width:80,require:true,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}